home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / progs / demo / X11 / logo / README < prev   
Encoding:
Text File  |  1994-09-27  |  2.0 KB  |  105 lines  |  [TEXT/ttxt]

  1. Ki-Wing Ho and Eric Fox
  2. Computer Science 429b
  3. Professor Hudak
  4. Final Project:  User Manual
  5.  
  6.  
  7. Control Commands:
  8.  
  9.  
  10. (DO <clause> WHILE <cond>)
  11.  
  12.    Loop, executing a list of commands, then checking a condition and
  13. looping again if the condition is true.
  14.  
  15.  
  16. (REPEAT n TIMES)
  17.   WHILE cn cl
  18.   IF cn THEN cl1 [ELSE cl2]
  19.  
  20. Load a file:
  21.   USE "filename
  22.  
  23. Environment Commands:
  24.   MAKE "nm v
  25.   LOCAL "nm
  26.   TO :nm1 :nm2 :nm3 ... cl
  27.  
  28. Text I/O:
  29.   PRINT v
  30.   READ
  31.  
  32. Graphics Commands:
  33.   FORWARD n
  34.   BACKWARD n
  35.   SETXY n1 n2
  36.   LEFT n
  37.   RIGHT n
  38.   PENUP
  39.   PENDOWN
  40.   HIDETURTLE
  41.   SHOWTURTLE
  42.   CLEARSCREEN
  43.   CLEAN
  44.  
  45. Graphics Functions:
  46.   XCOR
  47.   YCOR
  48.   GETANGLE
  49.   GETPEN
  50.   GETTURTLE
  51.  
  52. Mathematical:
  53.   SUM n1 n2
  54.   DIFFERENCE n1 n2
  55.   PRODUCT n1 n2
  56.   MOD n1 n2
  57.   DIV n1 n2
  58.   POWER n1 n2
  59.  
  60. Boolean:
  61.   AND b1 b2
  62.   OR b1 b2
  63.   NOT b
  64.  
  65. Predicates:
  66.   WORDP v
  67.   LISTP v
  68.   NUMBERP v
  69.   GREATER n1 n2
  70.   LESS n1 n2
  71.   EQUAL v1 v2
  72.   
  73. Word/List:
  74.   FIRST t
  75.   LAST t
  76.   FPUT t l
  77.   BUTFIRST l
  78.   WORD w1 w2 w3 ...
  79.   LIST t1 t2 t3 ...
  80.   CONCAT l1 l2
  81.   SENTENCE t1 t2 t3 ...
  82.  
  83.  
  84. Our Logo interpreter will only support one of the three windowing
  85. modes: window mode, where the turtle, if it walks off the end of the
  86. screen, just continues going and does not wrap.  The two (unsupported)
  87. modes are fence mode where the turtle cannot walk off the end, and
  88. wrap mode.  The initial turtle state will be with the turtle hidden,
  89. the pen down, and the turtle in the center of the screen facing
  90. upwards.
  91.  
  92. All input (both for commands as well as user-input) will be
  93. case-insensitive, and the interpreter needs to handle lists, words,
  94. integers, and boolean values.  Also, typing "GoodBye" at the LOGO>
  95. prompt exits the interpreter.
  96.  
  97. All commands will be enclosed in parentheses, and all lists of
  98. commands will be enclosed in square brackets, so that there is no
  99. longer any need for the keyword "End". Also, all procedures will
  100. return the value of their last command, so that there are no Stop or
  101. Output commands.  IF statements should return the value of the last
  102. statement executed, but all looping constructs should return no value.
  103.  
  104.  
  105.